package com.kingsalert.kingsalert.activity;

import android.os.Bundle;
import android.widget.TextView;

import com.kingsalert.kingsalert.R;
import com.kingsalert.kingsalert.base.BaseActivity;
import com.kingsalert.kingsalert.config.Constant;
import com.kingsalert.kingsalert.dialog.CustomerServiceDialog;
import com.kingsalert.kingsalert.dialog.LogoutDialog;
import com.kingsalert.kingsalert.util.http.HttpUtil;

public class SettingActivity extends BaseActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_setting);
        page = "SETTING";

        findViewById(R.id.as_ib_back).setOnClickListener(v -> onBackPressed());
        findViewById(R.id.as_ib_customerservice).setOnClickListener(v -> new CustomerServiceDialog(this).show());

        TextView versionTv = findViewById(R.id.as_tv_version);
        versionTv.append(" "+ Constant.APP_VERSION_NAME);

        findViewById(R.id.as_btn_logout).setOnClickListener(v -> {
            HttpUtil.getInstance().saveBuriedPoint(page,"LOGOUT_CLICK","");
            new LogoutDialog(this).show();
        });

    }
}